package com.sora.model.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterParam {

    @ApiModelProperty(value = "用户昵称")
    @NotBlank(message = "姓名不能为空")
    @Length(min = 2, max = 10, message = "请设置2-10位的昵称")
    private String name;

    @ApiModelProperty(value = "用户密码")
    @NotBlank(message = "密码不能为空")
    @Length(min = 6, max = 15, message = "请设置6-15位的密码")
    private String password;

    @ApiModelProperty(value = "用户性别")
    @NotNull(message = "性别不能为空")
    private Integer gender;

    @ApiModelProperty(value = "用户年龄")
    @NotNull(message = "年龄不能为空")
    private Integer age;
}
